//
//  UILable+Extension.swift
//  weibobbaj
//
//  Created by Tiffany宝 on 16/4/17.
//  Copyright © 2016年 Tiffany. All rights reserved.
//

import UIKit

extension UILabel{
    
    // 设置 默认值
    convenience init(textFont:CGFloat,textColor:UIColor,preferredMaxLayoutWidth:CGFloat = 225){
        
        self.init()
        self.textColor = textColor
        self.font = UIFont.systemFontOfSize(textFont)
        
        if preferredMaxLayoutWidth > 0{
            
            //最大宽度约束
            self.preferredMaxLayoutWidth = preferredMaxLayoutWidth
            self.numberOfLines = 0
        }
    }
}
